Generally, illumination of an object being photographed is influenced by ambient light around the object. A camera photographing the object may use a flash to enhance illumination of the object. Due to a size limitation, a flash in a handheld electronic device such as a mobile phone or a tablet computer is usually too small to provide a sufficient illumination for an object to be photographed when in a dim environment.